<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
		<title>个人中心</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<script src="../js/rem.js"></script>
		<script src="../js/jquery.min.js" type="text/javascript"></script>
		<script src="../js/app.js"></script>
		<link rel="stylesheet" type="text/css" href="../css/base.css" />
		<link rel="stylesheet" type="text/css" href="../css/page.css" />
		<link rel="stylesheet" type="text/css" href="../css/all.css" />
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
		<link rel="stylesheet" type="text/css" href="../css/loaders.min.css" />
		<link rel="stylesheet" type="text/css" href="../css/loading.css" />
		<!--<script type="text/javascript">
			$(window).load(function() {
				$(".loading").addClass("loader-chanage")
				$(".loading").fadeOut(300)
			})
		</script>-->
	</head>
	<!--loading页开始-->
	<!--<div class="loading">
		<div class="loader">
			<div class="loader-inner pacman">
				<div></div>
				<div></div>
				<div></div>
				<div></div>
				<div></div>
			</div>
		</div>
	</div>-->
	<!--loading页结束-->

	<body>
		<div id="main" class="mui-clearfix">
		</div>

		<footer class="page-footer fixed-footer" id="footer">
			<ul>
				<li>
					<a href="../index.html">
						<img src="../img/home.png" />
						<p>首页</p>
					</a>
				</li>
				<li>
					<a href="../assortment/assortment_list.html">
						<img src="../img/classify.png" />
						<p>分类</p>
					</a>
				</li>
				<li>
					<a href="../shopcart/shop_cart_list.html">
						<img src="../img/shopping card.png" />
						<p>购物车</p>
					</a>
				</li>
				<li class="active">
					<a href="../usercenter/user_center.html">
						<img src="../img/mine.png" />
						<p>个人中心</p>
					</a>
				</li>
			</ul>
		</footer>
	</body>
	<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
	<script src="../js/fastclick.js"></script>
	<script src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/hmt.js"></script>
	<script src="../js/common/check.js"></script>
	<script src="../js/handlebar/handlebars-v4.0.11.js"></script>

	<!--注意这个3个js的导入顺序-->
	<script type="text/javascript" src="../js/common/const.js"></script>
	<script src="../js/service/request.js"></script>
	<script src="../js/service/user_service.js"></script>
	<!-- 模板       -->
	<script id="goods-template" type="text/x-handlebars-template">
		{{#if loginFlag}} {{#with user}}
		<div class="ptop clearfloat">
			<div class="tu clearfloat">
				<img src={{imgServerPath}}/{{userFace}}>

			</div>
			<p class="tel ta-c">
				{{nickName}}
			</p>
		</div>

		<div class="plist clearfloat">
			<ul>
				<li class="clearfloat">
					<a href="my_order_list.html">
						<i class="iconfont icon-quanbudingdan fl" ></i>
						<p class="fl">我的订单</p>
						<i class="iconfont icon-qianjin fr"></i>
					</a>
				</li>
				<li class="clearfloat">
					<a href="my_account.html">
						<i class="iconfont icon-icon fl"></i>
						<p class="fl">账号管理</p>
						<i class="iconfont icon-qianjin fr"></i>
					</a>
				</li>
				<li class="clearfloat">
					<a href="add_goods.html">
						<i class="iconfont icon-tianjia fl"></i>
						<p class="fl">发布商品</p>
						<i class="iconfont icon-qianjin fr"></i>
					</a>
				</li>

				<li class="clearfloat">
					<a href="about_us.html">
						<i class="iconfont icon-guanyu fl"></i>
						<p class="fl">关于我们</p>
						<i class="iconfont icon-qianjin fr"></i>
					</a>
				</li>
				<li class="clearfloat">
					<i class="iconfont icon-kefu fl"></i>
					<p class="fl">客服电话</p>
					<p class="tel fr">24小时 客服热线 400-888-8888</p>
				</li>
			</ul>
		</div>
		{{/with}} {{else}}

		<div class="ptop clearfloat">

			<!--<button>立即登录</button>-->
			<input type="button" value="立即登录" onclick="goLoginPage()" />
		</div>
		{{/if}}

	</script>

	<script>
		$(function() {
			var template = Handlebars.compile($("#goods-template").html());
			var nickName = localStorage.getItem("user_nick_name");
			var userFace = localStorage.getItem("user_face");
			if(checkUserIsLogin()) {
				//				var res = get_user_info();
				var data = {
					"loginFlag": true,
					"user": {
						nickName: nickName,
						userFace: userFace,
						imgServerPath: USER_FACE_PATH
					},
				};
				$('#main').html(template(data));
			} else {

				var data = {
					"loginFlag": false
				};
				$('#main').html(template(data));

			}
		});

		function goLoginPage() {
			mui.openWindow({
				url: 'login.html',

			});
		}
	</script>

</html>